﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MultiUpload.aspx.cs" Inherits="Admin.MultiUpload" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Multi Upload</title>
    <link href="/uploadify/uploadify.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="/uploadify/jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src="/uploadify/swfobject.js"></script>
    <script type="text/javascript" src="/uploadify/jquery.uploadify.v2.1.4.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
    $('#file_upload').uploadify({
      'uploader'  : '/uploadify/uploadify.swf',
      'script'    : '/uploadify/Upload.ashx',
      'cancelImg' : '/uploadify/cancel.png',
      'folder'    : '<%=UploadDestination %>',
      'fileExt'   : '*.jpg;*.jpeg;*.gif;*.png',
      'auto'      : true,
      'multi'     : true,
      'onError' : function(event,data)
      {
        $("#message").text("Lỗi trong quá trình tải file!");
      },
      'onSelectOnce': function(event,data)
      {
        $("#message").text("Đã chọn " + data.filesSelected + " file!");
      },
      'onAllComplete': function(event,data)
      {
        $("#message").text("Đã tải lên thành công " + data.filesUploaded + "/" + data.filesUploaded + " file!");
      }
    });
    });
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div id="message"></div>
      <input id="file_upload" name="file_upload" type="file" />
    </div>
    </form>
</body>
</html>
